﻿@{
    var error = " ";
    if (this.Request.Form["Button1"] == "Submit Bug")
    {
        
        if (this.Request.Form["TextBox1"] =="")
        {
            error = "Please enter details";
        }
        else
        {
        MyModel.bugReport.SubmitReport(this.Request.UserHostAddress, this.Request.Form["TextBox1"]);
        }
    }
    
    Page.Title = "Laos Traveller";
    Layout = "LaosLayout.cshtml"; 
}
<h1>
    LaosTraffic - Bug Report</h1>
<form name="form1" method="post" action="bugreport.cshtml" id="form1">
<label id="lblError">@error</label>
<p>
    <br />
    <textarea name="TextBox1" rows="2" cols="20" id="TextBox1" style="height: 249px; width: 500px;"></textarea>
    <input type="submit" name="Button1" value="Submit Bug" id="Button1" />
</p>

</form>
